package com.example.shopspring.Service;

import com.example.shopspring.Mapper.ProductMapper;
import com.example.shopspring.Model.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductService {

    private final ProductMapper productMapper;

    public ProductService(ProductMapper productMapper) {
        this.productMapper = productMapper;
    }

    public List<Product> getProductListByGenres(String genre) {
        return productMapper.selectByGenre(genre);
    }
}
